import json

class Chapter:
    def __init__(self,level):
        with open('./practice-list.json','r') as f:
            jstr = json.loads(f.read())
            current = jstr['questions'][level]
            self.question = current['question']
            self.tip = current['tip']
            self.teststr = [(item['str'],item['ret']) for item in current['teststr']]